package club.sanmubird.travel_culture_wx_demo.biz.source.audio.sedrvice;

import club.sanmubird.travel_culture_wx_demo.biz.source.audio.dao.AudioDao;
import club.sanmubird.travel_culture_wx_demo.biz.source.audio.entity.Audio;
import io.github.biezhi.anima.core.ResultKey;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: travel_culture_wx_demo
 * @description: audioService
 * @author: sam
 * @create: 2018-08-05 21:21
 * @update: 2018-08-05 21:21
 * @update: Sam
 **/
@Service
public class AudioService {

	@Autowired
	private AudioDao audioDao;

	public List<Audio> getAudiosBySpotId(Long spotId){
		return audioDao.getAudiosBySoptId(spotId);
	}
	public ResultKey save(Audio audio){
		return audioDao.save(audio);
	}
	public void batchSave(List<Audio> audioList){
        audioDao.batchSave(audioList);
	}
	public int update(Audio audio){
       return audioDao.update(audio);
	}
	public int deleteByAudioSid(Long audioSid){
		return audioDao.deleteByAudioSid(audioSid);
	}

	public int updateStatus(Long audioSid,Boolean status){
		return audioDao.updateStatus(audioSid,status);
	}
}
